#ifndef __PWM_H_
#define __PWM_H_
#include "sys.h"
#include "driver/ledc.h"

typedef enum {
    PWM_Channel_0 = 0, 
    PWM_Channel_1,
    PWM_Channel_2,    
    PWM_Channel_3,   
    PWM_Channel_4,     
    PWM_Channel_5,     
    PWM_Channel_6,    
    PWM_Channel_7, 
} pwm_channel_t;

void pwm_init(uint16_t freq);
void pwm2_init(uint16_t freq);
void pwm3_init(uint16_t freq);
void pwm4_init(uint16_t freq);
void TIM_SetCompare(pwm_channel_t channel, uint16_t duty);
#endif